package org.gruposp2p.dnie.model.xmladapter;

import javax.xml.bind.annotation.adapters.XmlAdapter;
import org.gruposp2p.dnie.model.DNIeDocumentToSignOption;

/**
 *
 * @author jj
 */
public class DNIeDocumentToSignOptionAdapter extends XmlAdapter<Integer, DNIeDocumentToSignOption> {

    @Override
    public Integer marshal(DNIeDocumentToSignOption documentToSignOption) throws Exception {
        return documentToSignOption.getId();
    }

    @Override
    public DNIeDocumentToSignOption unmarshal(Integer documentToSignOptionId) throws Exception {
        DNIeDocumentToSignOption documentToSignOption =
                new DNIeDocumentToSignOption();
        documentToSignOption.setId(documentToSignOptionId);
        return documentToSignOption;
    }

}
